$bool = Fs.SetAttrib
("<fileName>", "<attribute>")
Sets or returns the file's attribute.
Parameters
<fileName> Path of the file.
<attribute> Attribute of the file.
Return Value
Returns 1 if the attribute is successfully set, else returns 0.
Remarks
- Expected parameters to set the particular attribute are:
- N+, +N, N- or -N for Normal
- R+, +R, R- or -R for Read-only
- H+, +H, H- or -H for Hidden
- S+, +S, S- or -S for System
- A+, +A, A- or -A for Archive
Example
$src = "C:\Plugins\fs\file.txt"
$stat = fs.SetAttrib ($src,"R+")